<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title>CREATE NEW RESTAURANT</title>
<link rel="stylesheet" href="../../css/bootstrap/bootstrap.css"
	th:href="@{/css/bootstrap/bootstrap.css}" />
<script src="../../js/jquery-1.11.2.js" th:src="@{/js/jquery-1.11.2.js}"></script>
<script src="../../js/restaurant.js" th:src="@{/js/restaurant.js}"></script>
<style>
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('../fonts/glyphicons-halflings-regular.eot');
	src: url('../fonts/glyphicons-halflings-regular.eot?#iefix')
		format('embedded-opentype'),
		url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
		url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
		url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular')
		format('svg');
}
</style>
</head>
<body>
	<header></header>
	<nav class="navbar navbar-inverse">
		<div class="container-fluid">
			<div>
				<ul class="nav navbar-nav navbar-right">
					<li><a href="#"><span class="glyphicon glyphicon-search"></span>Sign
							Up</a></li>
					<li><a th:href="@{/j_spring_security_logout}"><span class="glyphicon glyphicon-log-out"></span>Logout</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<section>
		<article class="container col-sm-10 col-sm-offset-1">
			<div id="error"></div>
			<ol class="breadcrumb">
				<li><a th:href="@{/adminaccount/home}">Home</a></li>
				<li><a th:href="@{/restaurant/list}">Restaurant</a></li>
				<li class="active">Add</li>
			</ol>
			<div class="panel panel-success">
				<div class="panel-heading">CREATE NEW RESTAURANT</div>
				<div class="panel-body">
					<form id="addrestaurant" name="addrestaurant" method="post"
						th:action="@{/restaurant/add}" onsubmit="return validateForm();"
						class="form-horizontal container col-sm-10 col-sm-offset-1">
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantName">Restaurant
								Name:<span style="color: red">(*)</span>
							</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="restaurantName"
									name="restaurantName" placeholder="Enter restaurant name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantTitle">Restaurant
								Title:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="restaurantTitle"
									name="restaurantTitle" placeholder="Enter restaurant title" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="wardName">Ward
								Name:</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="wardName"
									name="wardName" placeholder="Enter ward name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantImage">Restaurant
								Image:</label>
							<div class="col-sm-9">
								<input type="file" accept="image/*" onchange="showImage();"
									class="form-control" id="resImg" name="resImg" />
							</div>
						</div>
						<div class="form-group">
							<div id="imgs" class="col-sm-offset-3 col-sm-9"></div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="openTime">Open/
								Close Time:<span style="color: red">(*)</span>
							</label>
							<div class="col-sm-3">
								<input type="time" class="form-control" id="openTime"
									name="openTime" />
							</div>
							<div class="col-sm-offset-1 col-sm-3">
								<input type="time" class="form-control" id="closeTime"
									name="closeTime" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="deliveryPrice">Delivery
								Price:<span style="color: red">(*)</span>
							</label>
							<div class="col-sm-9">
								<input type="number" class="form-control" id="deliveryPrice"
									name="deliveryPrice" placeholder="Enter delivery price" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="minOrder">Minimum
								Bill:<span style="color: red">(*)</span>
							</label>
							<div class="col-sm-9">
								<input type="number" class="form-control" id="minOrder"
									name="minOrder" placeholder="Enter minimum bill" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="city">City/
								District<span style="color: red">(*)</span>
							</label>
							<div class="col-sm-3">
								<select id="city" name="city" class="form-control" onchange="getDistrict();">
									<option value="0">Chọn Thành Phố</option>
									<option th:each="city : ${cityList.entrySet()}"
										th:value="${city.key}" th:text="${city.value}"></option>
								</select>
							</div>
							<div class="col-sm-offset-1 col-sm-3">
								<select id="districtId" name="districtId" class="form-control">
									<option value="0">Chọn Quận</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Delivery Home:</label>
							<div class="col-sm-3">
								<div id="checkboxlist" class="form-control"
									style="height: 10em; width: 18em; overflow: auto;"></div>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Category:</label>
							<div class="col-sm-9">
								<div id="checkboxcategory" class="form-control"
									style="height: 12em; width: 20em; overflow: auto;">
									<div th:each="category : ${categoryList.entrySet()}">
										<input th:value="${category.key}" th:text="${category.value}"
											type="checkbox" />
									</div>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="restaurantNote">Notes:</label>
							<div class="col-sm-9">
								<textarea class="form-control" rows="3" id="restaurantNote"
									name="restaurantNote" placeholder="Enter restaurant note"></textarea>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-2">
								<button type="button" onclick="backPage();"
									class="btn btn-primary glyphicon glyphicon-backward">Back</button>
							</div>
							<div class="col-sm-offset-1 col-sm-3 pull-right">
								<button type="submit"
									onclick="getDeliveryHome();getCategoryIds();addInputImage();"
									class="btn btn-primary glyphicon glyphicon-new-window">Create</button>
							</div>
						</div>
					</form>
				</div>
				<div class="panel-footer"></div>
			</div>
		</article>
	</section>
	<footer class="container col-sm-12">
		<ol class="breadcrumb text-center">
			<li class="active"><p>@copyright - University Of Information
					Technology - Spring + hibernate + css3 + html5</p></li>
		</ol>
	</footer>
</body>
</html>